import {Component, OnInit, Output, EventEmitter} from '@angular/core';
import {ActivatedRoute, Router} from "@angular/router";

@Component({
  selector: 'iotek-navigate',
  templateUrl: './navigate.component.html',
  styleUrls: ['./navigate.component.less']
})
export class NavigateComponent implements OnInit {

  constructor(private router: Router ) { }
  flag = true;
  toggle(){
    this.flag = !this.flag;
  }
  ngOnInit() {

  }
  title: string;
  @Output('routeChange') changes = new EventEmitter<string>();
  set(title:string){
    this.title = title;
    this.changes.emit(this.title);
  }

  setClasses() {
    let classes =  {
      "glyphicon-plus": !this.flag,      // false
      "glyphicon-minus" : this.flag, // true
    };
    return classes;
  }
}
